/**
 * 
 */
package org.william.common_boot.business.control;

import io.swagger.annotations.ApiOperation;

import org.william.common_boot.business.service.impl.CityServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/** 
 * Description: 
 * @author xuhongwei
 * @version 1.0
 * <pre>
 * Modification History: 
 * Date         Author      Version     Description 
------------------------------------------------------------------
 * 2018年4月10日    xuhongwei     1.0        1.0 Version 
 * </pre>
 */

@RestController
@RequestMapping("/city")
public class CityControl {

	@Autowired
	CityServiceImpl cityService;
	
	@ApiOperation(value="获取主库的城市列表信息", notes="")
	@RequestMapping(value="/getCityMaster",method=RequestMethod.GET)
	public Object getCityMaster(){
		return cityService.queryAllCityListMaster();
		
	}
	
	@ApiOperation(value="获取从库的城市列表信息", notes="")
	@RequestMapping(value="/getCitySlave",method=RequestMethod.GET)
	public Object getCitySlave(){
		return cityService.queryAllCityListSlave();
	}

	@ApiOperation(value="查询城市信息", notes="根据城市名称查询城市信息")
	@RequestMapping(value="/getCityByName",method=RequestMethod.GET)
	public Object getCityByName(String cityName){
		return cityService.queryCityByName(cityName);
	}
	
}
